package com.eurasia.assignment.infrastructure.hoj;

import java.time.LocalDateTime;

import org.hibernate.annotations.CreationTimestamp;

import com.eurasia.assignment.domain.hoj.HOJJudgementStatus;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * HOJ完整测试用例判题记录的持久化实体
 */
@Entity
@Table(name = "hoj_full_case_judgement")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HOJFullCaseJudgementEntity {
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private Long submitterId;

    private Long problemId;

    private String problemNo;
    
    @Column(name = "problem_title", length = 255)
    private String problemTitle;

    private String language;

    // 提交的代码
    @Column(name = "submitted_code", columnDefinition = "TEXT")
    private String submittedCode;

    // 综合测试结果
    @Column(name = "summarized_result", columnDefinition = "TEXT")
    private String summarizedResult;
    
    // 详细测试结果
    @Column(name = "detailed_result", columnDefinition = "TEXT")
    private String detailedResult;
    
    // 提交请求的原始内容
    @Column(name = "submit_request", columnDefinition = "TEXT")
    private String submitRequest;
    
    @Enumerated(EnumType.STRING)
    private HOJJudgementStatus status;

    private Long runId;

    @CreationTimestamp
    private LocalDateTime createdAt;
} 